package com.allenkerr.service.impl;

import com.allenkerr.client.PeopleFeignClient;
import com.allenkerr.model.Person;
import com.allenkerr.service.StaticInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 小柯(Allen Kerr) on 17.6.25 00:28.
 */
@Service
public class StaticInfoServiceImpl implements StaticInfoService {

    @Autowired
    private PeopleFeignClient feignClient;

    @Override
    public Person getPersonById(Integer id) {
        return feignClient.getPersonByIdToPojo(id);
    }

    @Override
    public List<Person> getPeople() {
        return feignClient.getPeopleToPojo();
    }
}
